package la.iok.hzsvn.lewin.movie.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties("app.movie.encoder")
public class MovieEncodeProperty {
    /**
     * 是否在查询剧本密钥前做验证。默认为true。新增功能，做配置项，如果出现异常可以通过配置临时关闭
     */
    private Boolean validateBeforeGetMovieEncoder = true;

    public Boolean getValidateBeforeGetMovieEncoder() {
        return validateBeforeGetMovieEncoder;
    }

    public void setValidateBeforeGetMovieEncoder(Boolean validateBeforeGetMovieEncoder) {
        this.validateBeforeGetMovieEncoder = validateBeforeGetMovieEncoder;
    }

    public boolean validateBeforeGetEncoder(){
        return validateBeforeGetMovieEncoder != null && validateBeforeGetMovieEncoder;
    }
}
